import http from '@/utils/httpRequest'
import request from '@/utils/httpRequest'

export default {
    // 带条件分页查询酒店设置
    getHotelSetList(current,limit,searchObj) {
        return request({
            url: http.adornUrl(`/hotel/hotelSet/findPageHotelSet/${current}/${limit}`),
            method: 'post',
            data: http.adornData(searchObj, false)
        })
    },

    // 删除酒店设置
    deleteHotelSet(id) {
        return request ({
            url: http.adornUrl(`/hotel/hotelSet/${id}`),
            method: 'delete'
        })
    },

    // 批量删除酒店设置
    batchRemoveHotelSet(idList) {
        return request({
            url: http.adornUrl(`/hotel/hotelSet/batchRemove`),
            method: 'delete',
            data: http.adornData(idList, false)
        })
    },

    // 锁定和取消锁定
    lockHotelSet(id,status) {
            return request ({
            url: http.adornUrl(`/hotel/hotelSet/lockHotelSet/${id}/${status}`),
            method: 'put'
        })
    },

    // 添加酒店设置
    saveHotelSet(hotelSet) {
        return request ({
            url: http.adornUrl(`/hotel/hotelSet/saveHotelSet`),
            method: 'post',
            data: http.adornData(hotelSet, false)
        })
    },

    // 酒店设置id查询
    getHotelSet(id) {
        return request ({
            url: http.adornUrl(`/hotel/hotelSet/getHotelSet/${id}`),
            method: 'get'
        })
    },
     // 修改酒店设置
    updateHotelSet(hotelSet) {
        return request ({
            url: http.adornUrl(`/hotel/hotelSet/updateHotelSet`),
            method: 'post',
            data: http.adornData(hotelSet, false)
        })
    }

}